import java.util.Vector;
import java.util.Random;

/*
	TODO:
*/
class Party
{
	// note that I have two vectors here, when I really should have some kind of
	// multidimensional array.
	 private Vector<Combatant> Combatants;
	 private Vector<Combatant> AvailableCombatants;
	 private Random rGenerator;
	 private String sName;
	 public Party()
	 {
	 	 Combatants  = new Vector<Combatant>();
	 	 AvailableCombatants = new Vector<Combatant>();
	 	 rGenerator  = new Random();
	 	 sName = "Unnamed Party";
	 }
	 public String GetName()
	 {
	 	 return sName;
	 }
	 public void SetName(String sNewName)
	 {
	 	 sName = sNewName;
	 }
	 public boolean Undefeated()
	 {
	 	 if(CombatantsLeft() > 0)
	 	 {
	 	 	 return true;
	 	 }
	 	 return false;
	 }
	 public int CombatantsLeft()
	 {
	 	 return AvailableCombatants.size();
	 }
	 public Combatant GetRandMember()
	 {
	 	 int iMembers = AvailableCombatants.size();
	 	 return GetMember(rGenerator.nextInt(iMembers));
	 }
	 public Combatant GetMember(int i)
	 {
	 	 return AvailableCombatants.elementAt(i);
	 }
	 public void AddMember(Combatant NewGuy)
	 {
	 	 Combatants.add(NewGuy);
	 	 AvailableCombatants.add(NewGuy);
	 	 NewGuy.SetParty(this);
	 	 System.out.println(NewGuy.GetName());
	 }
	 public void RemoveMember(Combatant Leaving)
	 {
	 	 AvailableCombatants.remove(Leaving);
	 }
}
